<template>
    <div class="view-container">
         <!--面包屑 -->
      <el-breadcrumb :separator-icon="ArrowRight">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>后台设置</el-breadcrumb-item>
        <el-breadcrumb-item>轮播图</el-breadcrumb-item>
     </el-breadcrumb>

  <!--选择项 -->
  <div class="Select">
 </div>
 <el-table :data="tableData" border style="width: 100%" empty-text="没有数据!" #default="scope">
    <el-table-column v-for="item, index in column" v-model="column" :prop="item.prop" :label="item.label"
       :width="item.width">
    </el-table-column>
    <el-table-column label="操作" show-overflow-tooltip #default="scope">
       <main>
          <el-button type="success" @click="handleUpdate(scope.row);VerifyLoginView = true ">验证</el-button>
       </main>
    </el-table-column>
 </el-table>
    </div>

  <VerifyLogin v-model="VerifyLoginView" :data="Row"/>
</template>
<script setup lang="ts">
import { reactive, ref, onMounted } from 'vue'
import {getNotVerifiedLogin} from '../../../service/Login'
import VerifyLogin from './component/VerifyLogin.vue';

const VerifyLoginView = ref(false)


// 列表内容
const tableData = ref()
// 获取当行数据
const Row_List = ref()
const Row = reactive(Row_List)
// 列表List渲染
const column = reactive([
   {
      label: "账号",
      prop: "login_user",
      width: 150,
   },
   {
      label: "密码",
      prop: 'login_password',
      width: 200,
   },
   {
      label: "状态",
      prop: 'login_start',
      width: 200,
   },
   {
      label: "创建时间",
      prop: 'login_create_time',
      width: 200,
   }
])

onMounted(() => {
    getNotVerifiedLogin().then((res) => {
       tableData.value = res.data
    })
 })
 
 
    function handleUpdate(index) {
       Row_List.value = index
    }


</script>
<style></style>